﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CtrlYearEditFunds.ascx.cs"
    Inherits="Thksoft.UserCotrols.CtrlYearEditFunds" %>
<link href="../../CSS/Main.css" rel="stylesheet" type="text/css" />
<asp:HiddenField ID="HidEdtYear" runat="server" />
<div style="float: left; width: 100%;">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td valign="top">
                <div id="div" style="width: 95%; border: 0;">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="text-align: center; font-size: 16px; font-weight: bold; height: 30px;">
                                <asp:Label ID="lblyear" runat="server" />
                                年资金计划
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="float: left; width: 100%;">
                                    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
                                        <tr>
                                            <td style="width: 100px; padding-right: 3px; text-align: right;">填报单位：
                                            </td>
                                            <td style="text-align: left; padding-left: 3px;">
                                                <asp:Label ID="lbldw" runat="server" />
                                            </td>
                                            <td></td>
                                            <td style="width: 100px;">计量单位：万元
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <style type="text/css">
                                    .cont_list td.left {
                                        text-align: left;
                                        padding-left: 10px;
                                    }

                                    .cont_list td.right {
                                        text-align: right;
                                        padding-right: 10px;
                                    }

                                    .cont_list .txt {
                                        text-align: left;
                                        text-indent: 8px;
                                    }
                                </style>
                                <asp:GridView ID="gvMonthFunds" runat="server" Width="100%" CssClass="cont_list"
                                    AutoGenerateColumns="False" OnRowDataBound="gvMonthFunds_RowDataBound">
                                    <Columns>
                                        <asp:TemplateField HeaderText="编号" HeaderStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
                                            <ItemTemplate>
                                                <asp:Label ID="lblProID" runat="server" Text='<%#Eval("n_proid") %>'></asp:Label>
                                                <asp:Label ID="lbltype" runat="server" Text='<%#Eval("n_type") %>' Visible="false"></asp:Label>
                                                <asp:Label ID="lblId" runat="server" Text='<%#Eval("n_ydetail_id") %>' Visible="false"></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="50px"></HeaderStyle>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="项目名称" ItemStyle-CssClass="left">
                                            <ItemTemplate>
                                                <asp:Label ID="txtProjectName" runat="server" Text='<%#Eval("c_proname") %>'></asp:Label>
                                            </ItemTemplate>
                                            <HeaderStyle Width="300px" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="资金计划">
                                            <ItemTemplate>
                                                <asp:Label ID="lblMonthjh" runat="server" CssClass="sum" Text='<%#Eval("n_amount") %>'
                                                    Visible="false"></asp:Label>
                                                <asp:TextBox ID="txtNowMonth" runat="server" Width="90%" CssClass="xmtxt" Text='<%#Eval("n_amount")%>'></asp:TextBox>
                                                <%-- onkeydown="return NoNumber()"--%>
                                            </ItemTemplate>
                                            <HeaderStyle Width="200px" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="备注">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtremark" Width="99%" CssClass="txt" runat="server" Text='<%#Eval("c_remark")%>'></asp:TextBox>
                                                <asp:Label ID="lblreMark" runat="server" Text='<%#Eval("c_remark") %>' Visible="false"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <%--
                                           <asp:BoundField DataField="c_proname" HeaderText="项目名称" />
                                           <asp:BoundField DataField="n_amount" HeaderText="资金计划" />

                                            <asp:BoundField DataField="c_remark" HeaderText="备注" />--%>
                                    </Columns>
                                    <EmptyDataTemplate>
                                        没有你所查询的数据
                                    </EmptyDataTemplate>
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: left; padding-left: 5px; height: 30px;">编制依据及事由：
                                <asp:Label ID="lblBzyj" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align: center;">
                                <input type="hidden" runat="server" id="hidId" />
                                申请人：<asp:Label ID="lblUser" runat="server" />
                                &nbsp;&nbsp;&nbsp; &nbsp;申请时间：
                                <asp:Label ID="lblTime" runat="server" /><input type="hidden" runat="server" id="Hidden1" />
                                &nbsp;&nbsp;&nbsp; &nbsp;
                                <asp:Button ID="btnEdtSum" runat="server" Text="求和" CssClass="bt_css_s" OnClick="btnEdtSum_Click" />
                                <asp:Button ID="btnEdit" Style="display: none" runat="server" Text="修改" CssClass="bt_css_s"
                                    OnClick="btnEdit_Click" />
                                <input type="button" value="修改" class="bt_css_s" onclick="top.MessageBox.Show({Type:'confirm',Msg:'确定修改年资金计划明细吗?',YesCallback:function(index, layero){top.layer.close(index);document.getElementById('<%=this.btnEdit.ClientID %>').click();}})" />
                                <asp:Button ID="btnPrint" runat="server" Text="打印" CssClass="bt_css_s"
                                    OnClientClick="return PrintApplyBill();" Visible="false" />
                                <asp:Button runat="server" Text="打印" CssClass="bt_css_s" OnClick="PrintClick" />
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">

    function NoNumber() {
        //回车、上、下求和
        if (event.keyCode == 13 || event.keyCode == 40 || event.keyCode == 38) {
           // sum();
            return true;
        }
        if (event.keyCode == 110 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 46 || event.keyCode == 190) {
            return true;
        }
        if (event.keyCode != 8) {
            if (!((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 96 && event.keyCode <= 105))) {
                return false;
            }
        }
        return true;
    }
</script>